﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Rabbit.lnfarnum.Migrations
{
    public partial class db : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Cltvations",
                columns: table => new
                {
                    Cltvationid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Pbatches = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Cvariety = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Csource = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CDays = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Cbrand = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CDate = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Cltvations", x => x.Cltvationid);
                });

            migrationBuilder.CreateTable(
                name: "Enterprs",
                columns: table => new
                {
                    Enterprid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Pbatches = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Farms = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FNumber = table.Column<int>(type: "int", nullable: false),
                    CompanyName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CrovinceId = table.Column<int>(type: "int", nullable: false),
                    CityId = table.Column<int>(type: "int", nullable: false),
                    CountyId = table.Column<int>(type: "int", nullable: false),
                    CDTimme = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CompanyCV = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Enterprs", x => x.Enterprid);
                });

            migrationBuilder.CreateTable(
                name: "Images",
                columns: table => new
                {
                    Imageid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Itype = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    INmae = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Pbatches = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Images", x => x.Imageid);
                });

            migrationBuilder.CreateTable(
                name: "Immunitys",
                columns: table => new
                {
                    Immunityid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Pbatches = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IDays = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Ihealth = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Iheamethod = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ISdate = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Immunitys", x => x.Immunityid);
                });

            migrationBuilder.CreateTable(
                name: "MerchandiseMangems",
                columns: table => new
                {
                    MerchandMangeid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MerchanMid = table.Column<int>(type: "int", nullable: false),
                    Pbatches = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Slfsky = table.Column<int>(type: "int", nullable: false),
                    Plinumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ManufacName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Coverimage = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Complete = table.Column<int>(type: "int", nullable: false),
                    Propection = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Idate = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MerchandiseMangems", x => x.MerchandMangeid);
                });

            migrationBuilder.CreateTable(
                name: "Merchans",
                columns: table => new
                {
                    MerchanMid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MerchanName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Merchans", x => x.MerchanMid);
                });

            migrationBuilder.CreateTable(
                name: "Slaughterinfos",
                columns: table => new
                {
                    Slaughterinfoid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Pbatches = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SAverage = table.Column<int>(type: "int", nullable: false),
                    SDTitm = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SDtimez = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Slaughterinfos", x => x.Slaughterinfoid);
                });

            migrationBuilder.CreateTable(
                name: "Vendors",
                columns: table => new
                {
                    Vendorid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Vtype = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Pbatches = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Vendors", x => x.Vendorid);
                });

            migrationBuilder.CreateTable(
                name: "workerss",
                columns: table => new
                {
                    Workersid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Pbatches = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WTeam = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WThebus = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    WProduction = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_workerss", x => x.Workersid);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Cltvations");

            migrationBuilder.DropTable(
                name: "Enterprs");

            migrationBuilder.DropTable(
                name: "Images");

            migrationBuilder.DropTable(
                name: "Immunitys");

            migrationBuilder.DropTable(
                name: "MerchandiseMangems");

            migrationBuilder.DropTable(
                name: "Merchans");

            migrationBuilder.DropTable(
                name: "Slaughterinfos");

            migrationBuilder.DropTable(
                name: "Vendors");

            migrationBuilder.DropTable(
                name: "workerss");
        }
    }
}
